﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sunboxsoft.WinForm
{
    public interface IViewManager
    {
        /// <summary>
        /// 退出系统
        /// </summary>
        void Exit();

        void ReplaceRootView(IView view);
        void ReplaceView(IView view);
        void SwitchView(IView view);
        void PopupView(IView view, PopupViewArgs args);
        void CloseView(bool result, object data);
        void ShowMask(IView view, string text);
        void HideMask(IView view);

        /// <summary>
        /// 显示错误消息
        /// </summary>
        /// <param name="message"></param>
        void ShowError(string message);
        /// <summary>
        /// 显示告警消息
        /// </summary>
        /// <param name="message"></param>
        void ShowWarning(string message);
        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="message"></param>
        void ShowInfo(string message);
        /// <summary>
        /// 显示问题窗口
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        bool ShowQuestion(string message);

        /// <summary>
        /// 显示或隐藏动作
        /// </summary>
        /// <param name="view"></param>
        /// <param name="name"></param>
        /// <param name="isShow"></param>
        void ShowAction(IView view, string name, bool isShow);

        /// <summary>
        /// 启用或禁用动作
        /// </summary>
        /// <param name="view"></param>
        /// <param name="name"></param>
        /// <param name="isEnable"></param>
        void EnableAction(IView view, string name, bool isEnable);
    }
}
